 //404.左叶子之和
 //https://leetcode.cn/problems/sum-of-left-leaves/
class Solution {
public:
    int sumOfLeftLeaves(TreeNode* root) {
        if(!root) return 0;
        int ret = 0;
        if(root->left && !root->left->left && !root->left->right) ret += root->left->val;
        ret += sumOfLeftLeaves(root->left);
        ret += sumOfLeftLeaves(root->right);
        return ret;
    }
};